3.2.38 \(\int (a+b \tanh ^{-1}(\frac {c}{x})) \, dx\) [138]

Optimal. Leaf size=29 \[ a x+b x \tanh ^{-1}\left (\frac {c}{x}\right )+\frac {1}{2} b c \log \left (c^2-x^2\right ) \]

[Out]

a*x+b*x*arctanh(c/x)+1/2*b*c*ln(c^2-x^2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {6021, 269, 266} \begin {gather*} a x+\frac {1}{2} b c \log \left (c^2-x^2\right )+b x \tanh ^{-1}\left (\frac {c}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTanh[c/x],x]

[Out]

a*x + b*x*ArcTanh[c/x] + (b*c*Log[c^2 - x^2])/2

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rubi steps

\begin {align*} \int \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right ) \, dx &=a x+b \int \tanh ^{-1}\left (\frac {c}{x}\right ) \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x}\right )+(b c) \int \frac {1}{\left (1-\frac {c^2}{x^2}\right ) x} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x}\right )+(b c) \int \frac {x}{-c^2+x^2} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x}\right )+\frac {1}{2} b c \log \left (c^2-x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 29, normalized size = 1.00 \begin {gather*} a x+b x \tanh ^{-1}\left (\frac {c}{x}\right )+\frac {1}{2} b c \log \left (c^2-x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTanh[c/x],x]

[Out]

a*x + b*x*ArcTanh[c/x] + (b*c*Log[c^2 - x^2])/2

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 48, normalized size = 1.66

method result size
default \(a x +b x \arctanh \left (\frac {c}{x}\right )+\frac {b c \ln \left (1+\frac {c}{x}\right )}{2}-b c \ln \left (\frac {c}{x}\right )+\frac {b c \ln \left (\frac {c}{x}-1\right )}{2}\) \(48\)
derivativedivides \(-c \left (-\frac {a x}{c}-\frac {b x \arctanh \left (\frac {c}{x}\right )}{c}-\frac {b \ln \left (1+\frac {c}{x}\right )}{2}+b \ln \left (\frac {c}{x}\right )-\frac {b \ln \left (\frac {c}{x}-1\right )}{2}\right )\) \(55\)
risch \(a x +\frac {b x \ln \left (x +c \right )}{2}-\frac {b \ln \left (c -x \right ) x}{2}-\frac {i b \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2} x}{4}-\frac {i b \pi \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{3} x}{4}+\frac {i b \pi \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2} x}{2}-\frac {i b \pi \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{3} x}{4}+\frac {i b \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right ) x}{4}-\frac {i b \pi \,\mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2} x}{4}+\frac {i b \pi \,\mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2} x}{4}-\frac {i b \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right ) x}{4}+\frac {i b \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2} x}{4}-\frac {i b \pi x}{2}+\frac {b c \ln \left (-c^{2}+x^{2}\right )}{2}\) \(271\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctanh(c/x),x,method=_RETURNVERBOSE)

[Out]

a*x+b*x*arctanh(c/x)+1/2*b*c*ln(1+c/x)-b*c*ln(c/x)+1/2*b*c*ln(c/x-1)

________________________________________________________________________________________

Maxima [A]
time = 0.25, size = 29, normalized size = 1.00 \begin {gather*} \frac {1}{2} \, {\left (2 \, x \operatorname {artanh}\left (\frac {c}{x}\right ) + c \log \left (-c^{2} + x^{2}\right )\right )} b + a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x),x, algorithm="maxima")

[Out]

1/2*(2*x*arctanh(c/x) + c*log(-c^2 + x^2))*b + a*x

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 35, normalized size = 1.21 \begin {gather*} \frac {1}{2} \, b c \log \left (-c^{2} + x^{2}\right ) + \frac {1}{2} \, b x \log \left (-\frac {c + x}{c - x}\right ) + a x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x),x, algorithm="fricas")

[Out]

1/2*b*c*log(-c^2 + x^2) + 1/2*b*x*log(-(c + x)/(c - x)) + a*x

________________________________________________________________________________________

Sympy [A]
time = 0.10, size = 24, normalized size = 0.83 \begin {gather*} a x + b \left (c \log {\left (- c + x \right )} + c \operatorname {atanh}{\left (\frac {c}{x} \right )} + x \operatorname {atanh}{\left (\frac {c}{x} \right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atanh(c/x),x)

[Out]

a*x + b*(c*log(-c + x) + c*atanh(c/x) + x*atanh(c/x))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 150 vs. \(2 (27) = 54\).
time = 0.41, size = 150, normalized size = 5.17 \begin {gather*} a x + \frac {{\left (c^{2} {\left (\log \left (\frac {{\left | -c - x \right |}}{{\left | c - x \right |}}\right ) - \log \left ({\left | -\frac {c + x}{c - x} - 1 \right |}\right )\right )} - \frac {c^{2} \log \left (-\frac {\frac {c {\left (\frac {c + x}{{\left (c - x\right )} c} + \frac {1}{c}\right )}}{\frac {c + x}{c - x} - 1} + 1}{\frac {c {\left (\frac {c + x}{{\left (c - x\right )} c} + \frac {1}{c}\right )}}{\frac {c + x}{c - x} - 1} - 1}\right )}{\frac {c + x}{c - x} + 1}\right )} b}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x),x, algorithm="giac")

[Out]

a*x + (c^2*(log(abs(-c - x)/abs(c - x)) - log(abs(-(c + x)/(c - x) - 1))) - c^2*log(-(c*((c + x)/((c - x)*c) +
 1/c)/((c + x)/(c - x) - 1) + 1)/(c*((c + x)/((c - x)*c) + 1/c)/((c + x)/(c - x) - 1) - 1))/((c + x)/(c - x) +
 1))*b/c

________________________________________________________________________________________

Mupad [B]
time = 0.68, size = 27, normalized size = 0.93 \begin {gather*} a\,x+b\,x\,\mathrm {atanh}\left (\frac {c}{x}\right )+\frac {b\,c\,\ln \left (x^2-c^2\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a + b*atanh(c/x),x)

[Out]

a*x + b*x*atanh(c/x) + (b*c*log(x^2 - c^2))/2

________________________________________________________________________________________